package com.wyz.note.project.auth.domain.controller;

import com.wyz.note.project.auth.common.enums.ResultCode;
import com.wyz.note.project.auth.core.base.Result;
import com.wyz.note.project.auth.core.base.ResultGenerator;
import com.wyz.note.project.auth.domain.pojo.UserBaseInfo;
import com.wyz.note.project.auth.domain.service.UserAuthInfoService;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 基础控制器
 * @Author: wei yz
 * @Date: 2022/6/19 14:32
 */
@RestController
@Api(tags = "基础接口")
public class BaseController {
    private static final Logger log = LoggerFactory.getLogger(BaseController.class);


    @GetMapping("/error")
    public Result error() {
        log.error("===========错误页面===========");
        return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR, "错误页");
    }

    @GetMapping("/index")
    public Result index() {
        log.info("============主页============");
        return ResultGenerator.genSuccessResult("主页");
    }

}
